<include file="Public:_head" />
<include file="Public:left" />
<div id="neirong">
    
 		<!--<h2 class="lm_title">公司图片</h2>-->
   
                
                <div id="GS_Photo">
                    <h3 class="subTitle no_bg"><img src="com_statics/images/icon_3.gif" alt="图片描述" style="left:4px;"/>公司图片<span>上传公司图片，让求职者更直观的了解公司！</span></h3>
            
                    <div id="UploadPhoto">
                        <form action="__URL__/add_pic" method="post" enctype="multipart/form-data" >
                        <p><a href="javascript:void(0)" id="clickupload" class="btn_">选择图片</a>
                        <input type="submit" id="submit" class="btn_" style="width:80px;height:25px;font-size:14px;line-height:25px;border:0px;"value="上  传"></p>
                        <input type="file" id="fileToUpload" name="fileToUpload" style="display:none">
                        <p>大小: 不超过2M,    格式: bmp, png, jpeg, jpg, gif ,   公司图片最多可以上传六张</p>
                        </form>
                    </div>
                    <!-- UploadPhoto结束 -->
            
                    <div id="GSPhotoList">
                        <ul>
                            <volist name="list" id="po">
                            <li><a href="#" class="photo" ><img src="{$po.pic.url}" alt="" /></a><a href="javascript:void(0)" class="btn_delpic" onClick="del_pic({$po.pid});">删  除</a></li>
                            </volist>
                        </ul>
            		<span class="clear"></span>
                    </div>
                    <!-- GSPhotoList结束 -->
            
                </div>
                <!-- GS_Photo结束 -->


	</div>
	<!-- neirong结束 -->


	<span class="clear"></span>
	<!-- 清除浮动 -->


</div>
<!-- container结束 -->

<script>
function del_pic(val){
    var con = confirm('确定删除该图片吗？');
    if(con){
        $.post("__URL__/del_pic", { "pid": val},
           function(data){
            if (data.status==1) {
              location.replace(location.href);  }
           }, "json");
    }
                    
}

$(document).ready(function(){
        $("#clickupload").click(function(){
            $("#fileToUpload").click();
        });
        $("#submit").click(function(){
            var val = $("#fileToUpload").attr('value');
            if(val == ""){
                alert('上传图片不能为空！');
                return false;
            }
        });

});
</script>
<include file="Public:bottom" />